#ifndef _DEFTRACK_CCLOTH_H_
#define _DEFTRACK_CCLOTH_H_

#include "ctrackedobject.h"

#include <buola/mat.h>
#include <buola/image/ccolor.h>
#include <buola/scene/transform/crigidbody.h>
#include <buola/scene/geodes/ccapsule.h>
#include <buola/io/curi.h>
#include <buola/cv/ccloud.h>

namespace buola { namespace tracker {

class CCloth : public CTrackedObject
{
public:
    CCloth(const cvi::CCloud_rgb8 &pCloud);

    int GetK() override;
    cvi::CCloud_rgb8 FilterCloud(const cvi::CCloud_rgb8 &pCloud) override;
    mat::CMat_f GetCloudFeatures(const cvi::CCloud_rgb8 &pCloud) override;
    mat::CMat_f GetObjectFeatures() override;

    void AddToScene(const scene::PScene &pScene) override;
    void ApplyEvidence(const mat::CMat_f &pPZGivenC,const mat::CMat_f &pObserved,const mat::CMat_f &pObject) override;
    
private:
    scene::PSoftBody mSoftBody;
    scene::PRigidBody mPlane;
};

/*namespace tracker*/ } /*namespace buola*/ }

#endif
